  <h1 class="pagetitle">Reply to Comment</h1>
  
  <div style="margin: 10px;">
    <div style="margin: 10px;">Replying to comment by <%= link_to @replyingto.user.login, :controller => 'account', :action => 'show', :id => @replyingto.user.login %> <%= distance_of_time_in_words_to_now(@replyingto.created_at) %> ago</div>
  
    <div style="clear: both; margin: 10px; border: dashed 1px #bbbbbb; padding: 5px;">
      <%= format_text(@replyingto.text) %>
    </div>
  </div>
  <div style="padding: 10px;">
    <% form_tag :controller => '/comment', :action => 'add', :id => params[:image_id] do %>
  
      <%= hidden_field 'comment', 'parent_id', :value=> params[:parent_id] %>
      <% @form_id = 'new' %>
      <%= render :partial => 'comment_form' %>
      
      <%= submit_tag "Reply" %>
    <% end %>
    <div id="reply_div">You are replying to a comment. <%= link_to_function 'Reset Form?', "if (confirm('Are you sure you want to reset the form?')) { new Ajax.Updater('comment_div', '/comment/new?image_id="+params[:image_id].to_s+"', {asynchronous:true, evalScripts:true, onComplete:function(request) {Element.hide('reply_spinner'); Element.show('comment_div');}, onLoading:function(request) {Element.show('reply_spinner'); Element.hide('comment_div');} }); tabs.setActiveTab('newcomment'); return false; }", :confirm => 'Are you sure you want to reset the form?' %></div>
  </div>